{*include file='share/head.html'*}


{*include file='index/header.html'*}
<!--内容-->
<div class="IC-card">
	<div class="container">
		<div class="upload">
			<h3>上传车辆信息</h3>
			<div class="info">
				<form action="index.php?c=index&m=addattach&carid={*$data.id*}{*if !$data.id*}x{*/if*}" method="post" enctype="multipart/form-data"
              accept-charset="UTF-8" onSubmit="return Submit()"> 
					<ul class="thumbnail" id="files">
                        {*foreach $carpic as $value*}	
						<li><span class='dge'></span>
	                        <div class='img-thumbnail'><img src='{*$value.picurl*}' alt="{*$value.speak*}" width='100%' height='100%'/></div>
	                        <input type='text'  class='form-control' name='updatanote' value="{*$value.speak*}" placeholder='请输入备注'>
	                        <input type='text' class='hidden' name='note' value="{*$value.speak*}" >
	                        <input type='text' class='hidden' name='carpicid' value='{*$value.id*}'>
                        </li>
			            {*/foreach*}
					</ul>
					<div class="text-right">
						<button type="submit" class="btn btn-success">下一步</button>
						<!--<a href="carinfo.html" class="btn btn-success">上传</a>-->
						<label for="file" >
							<span class="btn btn-info">选择</span>
						</label>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{*include file='share/footer.html'*}	
<script src="//cdn.bootcss.com/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="static/js/jquery-file.js"></script>
<script type="text/javascript">
	function picremove(obj){
		var picid = $(obj).siblings("input[name='carpicid']").val();
		var picidlast = $(obj).parents('ul').find("li:last input[name='carpicid']").val();
		picid != picidlast? picid = picid+',':picid = ','+picid;
		
		$.get('index.php?c=index&m=cardelpic&carpicid='+picid+'&carid={*$data.id*}',
		function(data,status){
		    alert("数据: " + data + "\n状态: " + status);
		});

	}
</script>